<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/pages/AdminUserPermissionCategory_list.js"></script>

<?php include $this->getLayoutFile('block_top_messages'); ?>
<form id="searchForm" class="searchForm1" method="post" action="">

    <fieldset>
        <legend>搜尋</legend>

        <div class="field">
            <label for="搜尋關鍵字">搜尋關鍵字</label>
            <div class="show">
                <input type="text" name="searchKey" value="<?php echo $searchKey; ?>" size="30" />
            </div>
            <div class="info"></div>
        </div>

        <div class="field">
            <label for="show">&nbsp;</label>
            <div class="show">
                <input class="submit" type="submit" value="顯示" />
            </div>
            <div class="info"></div>
        </div>

    </fieldset>

</form>
<br style="clear:both" />

<div class="block">
    <a href="<?php echo $this->url->get('adminUserPermissionCategory','new',$user); ?>" class="button1">建立</a>
</div>


<form id="listForm" method="post" action="<?php echo $this->createUrl('adminUserPermissionCategory/delete'); ?>">

    <table class="table1" cellspacing="0">
        <tr>
            <th class="nobg">
                <input class="checkbox" type="checkbox" id="chooseItemsAll" value="1" />
            </th>
            <th> key name       </th>
            <th> 名稱           </th>
            <th> 簡易說明       </th>
            <th> 狀態           </th>
            <th> 先後順序       </th>
        </tr>
        <?php
            foreach( $userPermissionCategories as $userPermissionCategory ) {
                echo '<tr>';
                echo '    <th><input class="checkbox" type="checkbox" name="chooseItems[]" value="'. $userPermissionCategory->getId() .'"></th>';
                echo     '<td>';
              //echo        '<a href="'. $this->url->get('adminUserPermissionCategory','edit',$userPermissionCategory) .'">';
                echo            $userPermissionCategory->getKeyName();
              //echo        '</a>';
                echo     '</td>';
                echo     '<td>'. $userPermissionCategory->getName()                 .'</td>';
                echo     '<td>'. $userPermissionCategory->getDescription()          .'</td>';
                echo     '<td>'. $userPermissionCategory->trByStatus('status', $userPermissionCategory->getStatus() ) .'</td>';
                echo     '<td>'. $userPermissionCategory->getOrderedPages()         .'</td>';
                echo '</tr>';
            }
        ?>
    </table>

</form>